sum = 0
i = 1
n = int(input('请输入数字：'))
while i <= n:
    sum = sum + i
    i += 1
print(sum)

# a = 0
# s = 3
# while a < 3:
#     b = int(input('请输入密码：'))
#     if b == 22:
#         print('访问授权成功')
#         break
#     else:
#         s -= 1
#         print(f'密码错误，请重新输入，你还有{s}次机会')
#         a += 1
